import { clamp, v2, v3 } from "cc";
import { AudioEnum } from "../SystemAudio/AudioEnum";
import { GlobalEnum } from "./GlobalEnum";

export const GlobalConfig = {
    //#region -------------框架配置
    // 当前是否为3D/2D游戏
    is3Dgame: true,

    // 是否开启调试模式 - 显示关卡胜利失败按钮
    isDebug: true,
    // 是否显示调试信息
    isShowDebugStats: false,
    // 是否关闭视频
    isCloseVideo: false,

    // 场景初始化时 预加载的子包
    initLoadBounds: ['AudioAssets', 'Game',],
    // 游戏运行时 必须加载的额外子包
    gameLoadBounds: ['Game'],
    //#endregion

    //#region --------------当前游戏自定义
    /**2D->3D的缩放大小 */
    Scale2DTo3D: 1 / 30,

    //奖励
    Award: {
        //
        InitialGold: 100,    //初始金币
        WinGold: 10,        //胜利奖励
        WinVideoRate: 5,        //视频多倍
        Lose: 0,
        //体力
        WinEnergy: 5,
        addStep: 1,        //增长数量
        LvCost: { 5: 10, 10: 15, 15: 25 },         //关卡消耗
        recoverTime: 300, //体力恢复时长(s)
        AutoEnergyMax: 100,          //自动增长的体力上限
        InitialEnergy: 30,          //初始体力
        // 碎片
        chip: 1,

        //挑战奖励
        HardWinGold: 7,
        HardWinEnergy: 7,
        HardWinChip: 1,

    },

    // 每天的免费试玩次数
    DaliyFreeLvCount: 10,

    // 挑战解锁关卡条件
    UnlockHardLv: 6,

    // 地图缩放最小宽度
    mapScaleMinWidth: 10,
    // 地图最小时->相机最低最高偏移量
    cameraCfg: {
        minOffsetH: 10,
        maxOffsetH: 25,
        maxOffsetX: 6,
        maxOffsetZ: 6,
    },
    // 道具按钮奖励
    propBtnAwardCfg: {
        [GlobalEnum.PropType.RefreshColor]: 1,
        [GlobalEnum.PropType.Remove]: 1,
        [GlobalEnum.PropType.RefreshRoles]: 1,
    },

    // 任务配置- val:所需完成次数
    MissionCfg: {
        '0': { type: GlobalEnum.MissionType.Login, val: 1, title: '每日登录', awards: [{ type: GlobalEnum.MissionAwardType.Gold, award: 100 }] },
        '1': { type: GlobalEnum.MissionType.PassLevel, val: 2, title: '完成2关', awards: [{ type: GlobalEnum.MissionAwardType.Gold, award: 200 }] },
        '2': { type: GlobalEnum.MissionType.PassLevel, val: 10, title: '完成10关', awards: [{ type: GlobalEnum.MissionAwardType.Gold, award: 1000 }] },
        '3': { type: GlobalEnum.MissionType.PassLevel, val: 20, title: '完成20关', awards: [{ type: GlobalEnum.MissionAwardType.food, award: 10 }] },
        '4': { type: GlobalEnum.MissionType.Video, val: 1, title: '观看1次视频', awards: [{ type: GlobalEnum.MissionAwardType.prop1, award: 1 }] },
        '5': { type: GlobalEnum.MissionType.RemoveAnimal, val: 100, title: '挪走100只动物', awards: [{ type: GlobalEnum.MissionAwardType.prop3, award: 1 }] },
        '6': { type: GlobalEnum.MissionType.RemoveAnimal, val: 300, title: '挪走300只动物', awards: [{ type: GlobalEnum.MissionAwardType.food, award: 2 }] },
        '7': { type: GlobalEnum.MissionType.RemoveAnimal, val: 1000, title: '挪走1000只动物', awards: [{ type: GlobalEnum.MissionAwardType.Gold, award: 1200 }] },
        '8': { type: GlobalEnum.MissionType.RemoveAnimal, val: 2000, title: '挪走2000只动物', awards: [{ type: GlobalEnum.MissionAwardType.Gold, award: 2500 }] },
        '9': { type: GlobalEnum.MissionType.Video, val: 3, title: '观看3次视频', awards: [{ type: GlobalEnum.MissionAwardType.prop2, award: 1 }] },
        '10': { type: GlobalEnum.MissionType.Video, val: 5, title: '观看5次视频', awards: [{ type: GlobalEnum.MissionAwardType.food, award: 2 }] },
        '11': { type: GlobalEnum.MissionType.LvupAnimalSpd, val: 1, title: '给动物提速1次', awards: [{ type: GlobalEnum.MissionAwardType.prop2, award: 1 }] },
        '12': { type: GlobalEnum.MissionType.LvupAnimalSpd, val: 5, title: '给动物提速5次', awards: [{ type: GlobalEnum.MissionAwardType.food, award: 1 }] },
        '13': { type: GlobalEnum.MissionType.LvupAnimalSpd, val: 10, title: '给动物提速10次', awards: [{ type: GlobalEnum.MissionAwardType.Gold, award: 500 }] },
        '14': { type: GlobalEnum.MissionType.Share, val: 1, title: '分享1次', awards: [{ type: GlobalEnum.MissionAwardType.food, award: 1 }] },
    },

    //#endregion
}
